package lenfs.util;

import java.util.HashMap;

import lenfs.impl.ServerImpl;

public class ProgMap extends HashMap<Long, ServerImpl> {

	private static final long serialVersionUID = 1L;

	private long minVersion = Long.MAX_VALUE;
	private long maxVersion = -1;

	public void newEntry(final ServerImpl server) {
		final long version = server.getVersion();
		minVersion = Math.min(version, minVersion);
		maxVersion = Math.max(version, maxVersion);
		put(version, server);
	}

	public long getLow() {
		return minVersion;
	}

	public long getHigh() {
		return maxVersion;
	}
}
